package ex03;

import java.util.Scanner;

public class StringMethod {
	public void StringMethod2() {
		Scanner scanner =new Scanner(System.in);
		System.out.println("请输入字符串：");
		String s=scanner.nextLine();
		for(int i=s.length()-1;i>=0;i--) {
			char c=s.charAt(i);
			String subs=new String(new char[] {c});
			//利用string类的方法进行大小写转换
			if(c>=65&&c<=90) {
				
				System.out.println(subs.toLowerCase()+' ');
			}
			else {
				
				System.out.println(subs.toUpperCase()+' ');
			}
		}
		scanner.close();
	}

}
